import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '../views/Login.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'login',
        component: LoginView,

    },
    {
        path: '/register',
        name: 'register',
        component: () => import("@/views/Register.vue")
    },
    {
        path: '/home',
        name: 'home',
        component: () => import("@/views/HomeView.vue"),
        children: [
            {
                path: '/user',
                name: 'user',
                component: () => import("@/components/BackMange/UserView.vue"),
            },
            {
                path: '/card',
                name: 'card',
                component: () => import("@/components/BackMange/CardView.vue"),
            },
            {
                path: '/trans',
                name: 'trans',
                component: () => import("@/components/BackMange/TransView.vue"),
            },
            {
                path: '/account',
                name: 'account',
                component: () => import("@/components/CardView/MyAccount.vue"),
            },
            {
                path: '/addCard',
                name: 'AddCard',
                component: () => import("@/components/CardView/AddCard.vue"),
            },
            {
                path: '/account',
                name: 'account',
                component: () => import("@/components/CardView/MyAccount.vue"),
            },
            {
                path: '/addmoney',
                name: 'addmoney',
                component: () => import("@/components/CardView/AddMoney.vue"),
            },
            {
                path: '/Transfer',
                name: 'Transfer',
                component: () => import("@/components/TransferOfPayment/Transfer.vue"),
            },
            {
                path: '/TransLog',
                name: 'TransLog',
                component: () => import("@/components/TransferOfPayment/TransLog.vue"),
            },
            {
                path: '/Logout',
                name: 'Logout',
                component: () => import("@/components/System/Logout.vue"),
            },
        ]
    }
]

const router = new VueRouter({
    routes
})

export default router
